package com.atguigu01.file.exer1;

import java.io.File;

/**
 * ClassName: test1
 * Description:
 *
 * @Author LIU
 * @Create 2025/3/27 20:45
 * @Version 1.0
 */

public class test1 {
//    创建一个与hello.txt文件在相同文件目录下的另一个名为abc.txt文件
public static void main(String[] args) {
    File file1 = new File("hello.txt");

    System.out.println(file1.getAbsolutePath());

    File file2 = new File(file1.getParentFile().getParent(),"abc.txt");

    System.out.println(file2.getAbsolutePath());
}
}
